USE [WSS_Content_80]
GO
/****** Object:  StoredProcedure [dbo].[proc_Show_user_project]    Script Date: 05/03/2011 12:39:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[proc_Show_user_project]

	-- Add the parameters for the stored procedure here
	@projecturl                   nvarchar(255)
AS
BEGIN

	select W.Title,UF.tp_Title ,UF.tp_Login, w.FullUrl from Webs W,UserInfo UF where UF.tp_SiteID = w.SiteId and UF.tp_DomainGroup!=1 and UF.tp_IsActive!=0 and  w.TemplateVersion!='3' and UF.tp_Token is not null and UF.tp_ExternalToken is not null and W.FullUrl = @projecturl 
	and W.SiteId not in 
    (Select SD.SiteId from SiteDeletion SD) 

END